home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / CRYPT.ELC < prev    next >
Text File  |  1993-03-28  |  14KB  |  162 lines

  1. ;;; compiled by jwz@thalidomide on Wed Jan 20 03:19:12 1993
  2. ;;; from file /u/jwz/emacs19/lisp/packages/crypt.el
  3. ;;; emacs version 19.4.1 Lucid.
  4. ;;; bytecomp version 2.09; 16-jan-93.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (byte-code "└┴!ê┬├!¼é─┬┼!¼é╞┬╟!¼â╚┬╔!¼â╩    └ç" [provide crypt boundp crypt-encryption-program "des -f -e -k" crypt-decryption-program "des -f -d -k" encryption-program "des -e -k" decryption-program "des -d -k"] 2)
  14. (defvar auto-decode-buffer t "\
  15. *Non-nil value means that the buffers associated with encoded files will
  16. be decoded automatically, without requesting confirmation from the user.
  17. Nil means to ask before doing the decoding.")
  18. (defvar auto-write-buffer-coded nil "\
  19. *Non-nil value means buffers to be written to files ending in .z (or .Z)
  20. will be gzip'ed (or compressed) automatically, without requesting confirmation
  21. from the user. Nil means to ask before doing this decoding.")
  22. (defvar buffer-save-encrypted nil "\
  23. *Non-nil means that when this buffer is saved it will be written out
  24. encrypted, as with the UNIX crypt(1) command.  Automatically local to all
  25. buffers.")
  26. (make-variable-buffer-local 'buffer-save-encrypted)
  27. (defvar buffer-save-compacted nil "\
  28. *Non-nil means that when this buffer is saved it will be written out
  29. compacted, as with the UNIX compact(1) command.  Automatically local to all
  30. buffers.")
  31. (make-variable-buffer-local 'buffer-save-compacted)
  32. (defvar buffer-save-compressed nil "\
  33. *Non-nil means that when this buffer is saved it will be written out
  34. compressed, as with the UNIX compress(1) command.  Automatically local to all
  35. buffers.")
  36. (make-variable-buffer-local 'buffer-save-compressed)
  37. (defvar buffer-save-gzipped nil "\
  38. *Non-nil means that when this buffer is saved it will be written out
  39. gzip'ed, as with the gzip (GNU zip) command.  Automatically local to all
  40. buffers.")
  41. (make-variable-buffer-local 'buffer-save-gzipped)
  42. (defvar buffer-encryption-key nil "\
  43. *Key to use when encrypting the current buffer, prior to saving it.
  44. Automatically local to all buffers.")
  45. (make-variable-buffer-local 'buffer-encryption-key)
  46. (defconst compact-magic-regexp " " "\
  47. Regexp that matches the magic number at the beginning of files created
  48. by the compact(1) command.")
  49. (defconst compress-magic-regexp "¥" "\
  50. Regexp that matches the magic number at the beginning of files created
  51. by the compress(1) command.")
  52. (defconst gzip-magic-regexp "ï" "\
  53. Regexp that matches the magic number at the beginning of files created
  54. by the gzip command.")
  55. (defconst crypt-magic-regexp-inverse "\\(..\\)?\\([ ]\\|[ ]\\)" "\
  56. Regexp that must NOT match the beginning of an encrypted buffer.")
  57. (fset 'save-point '(macro . #[(&rest body) "└┴!├\n─DC┼╞B╚\nDEE)ç" [make-symbol "saved-point" var let (point) unwind-protect progn body goto-char] 6 "\
  58. Save value of point, evalutes FORMS and restore value of point.
  59. If the saved value of point is no longer valid go to (point-max).
  60. This macro exists because, save-excursion loses track of point during
  61. some types of deletions."]))
  62. (fset 'find-crypt-file-hook #[nil "ë┴ ┬ëëëëë    \n` ╠Äî~êebê═!½▓¼ë╨╤╥╙ \"!½Ñ╘╒╙ \"ê╓p╫\"ê╫╪┘\"½å┌█öO▄ ¼°╘▌╙ \"ê¬≡═!½│¼ë╨╤▀╙ \"!½ª╘α╙ \"êßp╫\"ê╫╪Γ\"½å┌█öO▄ ¼┐╘π╙ \"ê¬╖═$!½▒¼ë╨╤σ╙ \"!½ñ╘µ╙ \"êτp╫\"ê╫╪Φ\"½å┌█öO▄ ¼å╘Θ╙ \"êm¼├Ωδd∞^╫#½║eb½╢═-!¼░.¼ä∩≡!ê.±Ü½ê╘≥╙ \"ê¬Ü╘≤╙ \"ê⌠.┬\"ê.▄ ¼å╘⌡╙ \"ê+¼ï¼ç¼ä¡░÷ ê≈ ê½ä°█!ê½ä∙█!ê½ä·█!ê½ê√█!ê.\nⁿ    !.    ç" [buffer-file-name buffer-modified-p nil buffer-read-only case-fold-search compacted gzipped compressed encrypted old-buffer-modified-p old-buffer-file-name saved-point ((goto-char saved-point)) looking-at compact-magic-regexp auto-decode-buffer y-or-n-p format "Uncompact buffer %s? " buffer-name message "Uncompacting %s..." compact-buffer t string-match "\\(\\.C\\)$" 0 1 input-pending-p "Uncompacting %s... done" compress-magic-regexp "Uncompress buffer %s? " "Uncompressing %s..." compress-buffer "\\(\\.Z\\)$" "Uncompressing %s... done" gzip-magic-regexp "gunzip buffer %s? " "gunzip'ing %s..." gzip-buffer "\\(\\.z\\)$" "gunzip'ing %s... done" re-search-forward "[Ç- ]" 15 crypt-magic-regexp-inverse buffer-encryption-key call-interactively set-encryption-key "" "No key given, buffer %s assumed normal." "Decrypting %s..." crypt-buffer "Decrypting %s... done" set-auto-mode hack-local-variables compress-mode gzip-mode compact-mode crypt-mode set-buffer-modified-p] 9])
  63. (fset 'write-crypt-file-hook #[nil "└\n«ì├─\"¡ç«â╟╚!    «ì├╩\"¡ç«â╟╦!    ) ¼î¼ê\n¼à    àAèî╬╧!└ëë╒╓╫ T#ê``}ê╪Ä┘!ê┌!ê½ìebê█ed▄▌$ê└ ½ƒ¼å▀αß \"ê;¼ä▀Γ!êπΣß \"êσµ\"ê½î\n½ë▀τß \"êé.½ïπΦß \"êΘ ê¬≈\n½╣└├─\"½ïπΩß \"êδ ê¬ú├╩\"½ôπ∞ß \"êφε!ê∩╓!ê≡ ê¬èφε!êπ±ß \"ê)¬╗    ½╖└├╩\"½ïπ∞ß \"ê≡ ê¬ú├─\"½ôπΩß \"ê∩ε!êφ╓!êδ ê¬è∩ε!êπ±ß \"ê)≥ed└µ%êed|ê≤└!ê.µç" [nil case-fold-search buffer-save-compressed string-match "\\.Z$" buffer-file-name auto-write-buffer-coded y-or-n-p "write file compressed? " buffer-save-gzipped "\\.z$" "write file gzip'ed? " buffer-save-encrypted buffer-save-compacted get-buffer-create " *crypt copy buffer*" selective-display after-change-function before-change-function buffer-read-only copy-buffer copy-to-buffer 1 buffer-size ((byte-code "ed|ç" [] 2)) insert-buffer-substring kill-buffer subst-char-in-region 13 10 buffer-encryption-key error "No encryption key set for buffer %s" buffer-name "Encryption key is not a string" message "Encrypting %s..." crypt-buffer t "Cannot compact and compress buffer %s" "Compacting %s..." compact-buffer "Compressing %s..." compress-buffer "gzip'ing %s..." compress-mode -1 gzip-mode gzip-buffer "Writing %s..." write-region set-buffer-modified-p] 6 "\
  64. Writes out file, if need be, in a compressed format."])
  65. (fset 'crypt-region #[(start end encrypt key) "`┴Äd├ ╟ë╚╔\n½ä ¬é ═Q&+ç" [saved-point ((goto-char saved-point)) opoint-max call-process-region start end shell-file-name t nil "-c" encrypt encryption-program decryption-program " " key] 11 "\
  66. Encrypt/decrypt the text in the region.
  67. From a program, this function takes four args: START, END, ENCRYPT and KEY.
  68. When called interactively START and END default to point and mark
  69. (START being the lesser of the two), KEY is prompted for." (byte-code "└ ê┴ ┬ ├─!┼╞!Fç" [barf-if-buffer-read-only region-beginning region-end y-or-n-p "Encrypt? " read-string-no-echo "Crypt region using key: "] 5)])
  70. (fset 'crypt-buffer #[(key encrypt &optional buffer) "¼épèqê┴ed\n $)ç" [buffer crypt-region encrypt key] 5 "\
  71. Using KEY, encrypt/decrypt BUFFER.
  72. BUFFER defaults to the current buffer." (byte-code "└ ê┴┬!Cç" [barf-if-buffer-read-only read-string-no-echo "Crypt buffer using key: "] 2)])
  73. (fset 'compact-region #[(start end &optional undo) "`┴Ä┬ ╞ë╟╚    ½â╩¬ü╦&ê    ?¡Ö bê╟ ═!?¡ï╧╨    ½â╤¬ü╥\")*ç" [saved-point ((goto-char saved-point)) call-process-region start end shell-file-name t nil "-c" undo "uncompact" "compact" case-fold-search looking-at compact-magic-regexp error "%s failed!" "Uncompaction" "Compaction"] 9 "\
  74. Compact the text in the region.
  75. From a program, this function takes three args: START, END and UNDO.
  76. When called interactively START and END default to point and mark
  77. (START being the lesser of the two).
  78. Prefix arg (or optional second arg non-nil) UNDO means uncompact." "*r\nP"])
  79. (fset 'compact-buffer #[(&optional buffer undo) "¼épèqê┴ed\n#)ç" [buffer compact-region undo] 4 "\
  80. Compact BUFFER.
  81. BUFFER defaults to the current buffer.
  82. Prefix arg (or second arg non-nil from a program) UNDO means uncompact." (byte-code "pDç" [current-prefix-arg] 2)])
  83. (fset 'compress-region #[(start end &optional undo) "`┴Ä┬ ╞ë╟╚    ½â╩¬ü╦&ê    ?¡Ö bê╟ ═!?¡ï╧╨    ½â╤¬ü╥\")*ç" [saved-point ((goto-char saved-point)) call-process-region start end shell-file-name t nil "-c" undo "compress -d" "compress" case-fold-search looking-at compress-magic-regexp error "%s failed!" "Uncompression" "Compression"] 9 "\
  84. Compress the text in the region.
  85. From a program, this function takes three args: START, END and UNDO.
  86. When called interactively START and END default to point and mark
  87. (START being the lesser of the two).
  88. Prefix arg (or optional second arg non-nil) UNDO means uncompress." "*r\nP"])
  89. (fset 'compress-buffer #[(&optional buffer undo) "¼épèqê┴ed\n#)ç" [buffer compress-region undo] 4 "\
  90. Compress BUFFER.
  91. BUFFER defaults to the current buffer.
  92. Prefix arg (or second arg non-nil from a program) UNDO means uncompress." (byte-code "pDç" [current-prefix-arg] 2)])
  93. (fset 'gzip-region #[(start end &optional undo) "`┴Ä┬ ╞ë╟╚    ½â╩¬ü╦&ê    ?¡Ö bê╟ ═!?¡ï╧╨    ½â╤¬ü╥\")*ç" [saved-point ((goto-char saved-point)) call-process-region start end shell-file-name t nil "-c" undo "gzip -d" "gzip" case-fold-search looking-at gzip-magic-regexp error "%s failed!" "gunzip'ing" "gzip'ing"] 9 "\
  94. gzip the text in the region.
  95. From a program, this function takes three args: START, END and UNDO.
  96. When called interactively START and END default to point and mark
  97. (START being the lesser of the two).
  98. Prefix arg (or optional second arg non-nil) UNDO means gunzip." "*r\nP"])
  99. (fset 'gzip-buffer #[(&optional buffer undo) "¼épèqê┴ed\n#)ç" [buffer gzip-region undo] 4 "\
  100. gzip BUFFER.
  101. BUFFER defaults to the current buffer.
  102. Prefix arg (or second arg non-nil from a program) UNDO means gunzip." (byte-code "pDç" [current-prefix-arg] 2)])
  103. (fset 'set-encryption-key #[(key &optional buffer) "¼épèqê    \nܽà├─!¬ê    ¡â╞╟!)ç" [buffer key buffer-encryption-key message "Key is identical to original, no change." buffer-save-encrypted set-buffer-modified-p t] 2 "\
  104. Set the encryption KEY for BUFFER.
  105. KEY should be a string.
  106. BUFFER should be a buffer or the name of one;
  107. it defaults to the current buffer.  If BUFFER is in crypt mode, then it is
  108. also marked as modified, since it needs to be saved with the new key." (byte-code "└ ê┴┬├─ \"!Cç" [barf-if-buffer-read-only read-string-no-echo format "Set encryption key for buffer %s: " buffer-name] 4)])
  109. (fset 'crypt-mode #[(&optional arg) "\n½à\n├V¬é?ë½å─├!ê¬Ä─½ç½â╟¬ü├!ê¡å╔    =?!)ç" [buffer-save-encrypted oldval arg 0 auto-save-mode auto-save-default buffer-file-name 1 buffer-encryption-key set-buffer-modified-p] 4 "\
  110. Toggle crypt mode.
  111. With arg, turn crypt mode on iff arg is positive, otherwise turn it off.
  112. In crypt mode, buffers are automatically encrypted before being written.
  113. If crypt mode is toggled and a key has been set for the current buffer, then
  114. the current buffer is marked modified, since it needs to be rewritten
  115. with (or without) encryption.
  116.  
  117. Use \\[set-encryption-key] to set the encryption key for the current buffer.
  118.  
  119. Entering crypt mode causes auto-saving to be turned off in the current buffer,
  120. as there is no way (in Emacs Lisp) to force auto save files to be encrypted." "P"])
  121. (fset 'compact-mode #[(&optional arg) "\n½à\n├V¬é?ë½å─├!ê¬Ä─½ç½â╟¬ü├!ê╚    =?!)ç" [buffer-save-compacted oldval arg 0 auto-save-mode auto-save-default buffer-file-name 1 set-buffer-modified-p] 4 "\
  122. Toggle compact mode.
  123. With arg, turn compact mode on iff arg is positive, otherwise turn it off.
  124. In compact mode, buffers are automatically compacted before being written.
  125. If compact mode is toggled, the current buffer is marked modified, since
  126. it needs to be written with (or without) compaction.
  127.  
  128. Entering compact mode causes auto-saving to be turned off in the current
  129. buffer, as there is no way (in Emacs Lisp) to force auto save files to be
  130. compacted." "P"])
  131. (fset 'compress-mode #[(&optional arg) "\n½à\n├V¬é?ë½å─├!ê¬Ä─½ç½â╟¬ü├!ê╚    =?!)ç" [buffer-save-compressed oldval arg 0 auto-save-mode auto-save-default buffer-file-name 1 set-buffer-modified-p] 4 "\
  132. Toggle compress mode.
  133. With arg, turn compress mode on iff arg is positive, otherwise turn it off.
  134. In compress mode, buffers are automatically compressed before being written.
  135. If compress mode is toggled, the current buffer is marked modified, since
  136. it needs to be written with (or without) compression.
  137.  
  138. Entering compress mode causes auto-saving to be turned off in the current
  139. buffer, as there is no way (in Emacs Lisp) to force auto save files to be
  140. compressed." "P"])
  141. (fset 'gzip-mode #[(&optional arg) "\n½à\n├V¬é?ë½å─├!ê¬Ä─½ç½â╟¬ü├!ê╚    =?!)ç" [buffer-save-gzipped oldval arg 0 auto-save-mode auto-save-default buffer-file-name 1 set-buffer-modified-p] 4 "\
  142. Toggle gzip mode.
  143. With arg, turn gzip mode on iff arg is positive, otherwise turn it off.
  144. In gzip mode, buffers are automatically gzip'ed before being written.
  145. If gzip mode is toggled, the current buffer is marked modified, since
  146. it needs to be written with (or without) gzip.
  147.  
  148. Entering gzip mode causes auto-saving to be turned off in the current
  149. buffer, as there is no way (in Emacs Lisp) to force auto save files to be
  150. gzip'ed." "P"])
  151. (fset 'read-string-no-echo #[(prompt &optional confirm) "└┴ìç" [return-value (byte-code "è└┴!┬├─ëëëë    \n ë qê═Ä╬ ê╧!ê╤ ë    ╥>¼£    ╙₧Aë½ç╒╓╫Åê¬ä    cê╧!ê¬[½ª½ó┘ ÿ¼ô╧┌P!ê█ ê▄▌!ê─¬1▐▀\"ê¬)½æ┘ ╧αP!ê▄▌!ê¬▐▀┘ \"ê¬ " [get-buffer-create " *password*" t 0 nil kill-ring done help-form string char echo-keystrokes cursor-in-echo-area input-buffer ((byte-code "└┴!ê┬ !ç" [set-buffer-modified-p nil kill-buffer input-buffer] 2)) erase-buffer message prompt read-char (13 10) ((8 delete-char -1) (127 delete-char -1) (21 delete-region 1 (point)) (24 delete-region 1 (point)) (17 quoted-insert 1) (22 quoted-insert 1)) form error-data (eval form) ((error)) confirm buffer-string "[Mismatch... try again.]" ding sit-for 2 throw return-value "[Retype to confirm...]"] 9)] 2 "\
  152. Read a string from the minibuffer, prompting with PROMPT.
  153. Optional second argument CONFIRM non-nil means that the user will be asked
  154.   to type the string a second time for confirmation and if there is a
  155.   mismatch, the process is repeated.
  156.  
  157. Line editing keys are:
  158.   C-h, DEL    rubout
  159.   C-u, C-x      line kill
  160.   C-q, C-v      literal next"])
  161. (byte-code "└┴┬\"ê└├┬\"ê└─┼╞#ê╟₧¼ë╔╩╦\"ñ╠═!ç" [add-hook find-file-hooks find-crypt-file-hook find-file-not-found-hooks write-file-hooks write-crypt-file-hook t buffer-save-compressed minor-mode-alist mapcar purecopy ((buffer-save-encrypted " Crypt") (buffer-save-compacted " Compact") (buffer-save-compressed " Compress") (buffer-save-gzipped " GNU-zip")) provide crypt] 4)
  162.